import request from '@/utils/request'

export function listadmin(query) {
  return request({
    url: '/iot/admin/list',
    method: 'get',
    params: query
  })
}
export function listDeviceUsers(query) {
  return request({
    url: '/iot/lightpole/counts',
    method: 'get',
    params: query
  })
}

// 查询灯杆列表
export function listLightpole(query) {
  return request({
    url: '/iot/lightpole/list',
    method: 'get',
    params: query
  })
}

// 查询灯杆详细
export function getLightpole(id) {
  return request({
    url: `/iot/lightpole/`+id,
    method: 'get',
  })
}

// 新增灯杆
export function addLightpole(data) {
  return request({
    url: '/iot/lightpole',
    method: 'post',
    data: data
  })
}

// 修改灯杆
export function updateLightpole(data) {
  return request({
    url: '/iot/lightpole',
    method: 'put',
    data: data
  })
}

// 删除灯杆
export function delLightpole(id) {
  return request({
    url: '/iot/lightpole/' + id,
    method: 'delete'
  })
}
